/*
 * SpringBoot向前端呈现数据
 * 天津工业大学 大数据实训 第四组
 * 杨玺锟
 * 2020-03-07
 **/

package com.tjise.g_fats_enemy.springboot.dao;

import com.tjise.g_fats_enemy.springboot.po.GameStats;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface GameStatsDao {
    @Select("SELECT WEEK ( time ) AS WEEK, ROUND( avg( PUBG ) ) AS PUBG, ROUND( avg( CSGO ) ) AS CSGO, ROUND( avg( Dota2 ) ) AS Dota2, ROUND( avg( GTAV ) ) AS GTAV, ROUND( avg( R6 ) ) AS R6, ROUND( avg( MHW ) ) AS MHW, ROUND( avg( `Online` ) ) AS ONLINE FROM game_data GROUP BY WEEK ( time )")
    List<GameStats> findGameStats();
}
